#ifndef IGSLIB_BATTERY_H
#define IGSLIB_BATTERY_H

#include <set>
#include <igslib_ibattery.h>

namespace igslib 
{
    class CBattery:public IBattery
    {
        protected:
            float capacity;
            bool low_voltage;
            ISpi* spi;
        public:
            CBattery()
            {
                capacity = 0;
                low_voltage = false;
                spi = nullptr;
            }
            virtual float GetCapacity()
            {
                return capacity;
            }
			virtual bool IsLowVoltage()
            {
                return low_voltage;
            }
            virtual void SetSPI(ISpi* value) { spi = value; }
    };

    class CBatteryManager:public IBatteryManager
    {
        static IBatteryManager* instance;
        public:
            static IBatteryManager* GetInstance();
			IBattery* New_ProjMCU(const std::string&);
    };
};

#endif
